package com.amigo.online.consumer.video.task;

import java.util.concurrent.Callable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile;

import com.amigo.online.consumer.video.util.UploadImgUtil;

public class SingleFileUploadCallable implements Callable<String>{

	protected static final Logger logger = LoggerFactory.getLogger(SingleFileUploadCallable.class);
	
	private MultipartFile multipartFile;
	
	public SingleFileUploadCallable(MultipartFile multipartFile) {
		super();
		this.multipartFile = multipartFile;
	}
	
	@Override
	public String call() throws Exception {
		String fileName = UploadImgUtil.concurrentUploadSingleFile(multipartFile);		
		return fileName;
	}

}
